{% extends "EMNewsBundle::layout.html.twig" %}
{% block title 'News - Dashboard' %}


{% block content %}
   <div class="title"><h5>Current Status </h5></div>
       
        <!-- Statistics -->
        <div class="stats">
        	<ul>
                <li><a href=" {%if draft>0 %} {{ path('em_news_list', {'status': 'Dr'}) }} {% else %} # {% endif%}" class="count blue" title="">{{ draft }}</a><span>Draft</span></li>
                <li><a href=" {%if approved>0 %} {{ path('em_news_list', {'status': 'A'}) }} {% else %} # {% endif%} "  class="count green" title="">{{ approved }}</a><span>Approved</span></li>
                <li><a href=" {%if pending>0 %} {{ path('em_news_list', {'status': 'P'}) }} {% else %} # {% endif%} " class="count yellow" title="">{{ pending}}</a><span>Pending</span></li>
				<li class="last"><a href=" {%if declined >0 %} {{ path('em_news_list', {'status': 'D'}) }} {% else %} # {% endif%}" class="count red" title="">{{ declined}}</a><span>Declined</span></li>
			</ul>
            <div class="fix"></div>
        </div>
        
   
	<!-- Support tickets -->
                <div class="widget">
                    <div class="head"><h5 class="iHome">Lastest Posts | {{ dt | date }}</h5><div class="num"><a href="#" class="greenNum">+ {{total | length}}</a></div></div>
					
                  	<div class="supTicket nobg">
							<div class="issueType">
								<span class="issueInfo">Lastest posts </span>
								
								<div class="fix"></div>
							</div>
							{% for post in total %}
							
							<div class="issueSummary">
								<div class="ticketInfo">
									<ul>
										<li><a href="{{ path('blog_show', {'slug': post.slug}) }}">{{post.title}}</a></li>
										
										<li class="even">
										
										</li>
										
										<li>{% if post.status=='A'%}
											<strong class="green">[ Approved ]</strong>
										{% elseif post.status=='D'%}
											<strong class="red">[ Declined ]</strong>
										{% else %}
											<strong class="yellow">[ Pending ]</strong>
										{% endif %}
										</li>
										
										<li class="even">{{ post.date_created | date('m/d/y')}}</li>
									</ul>
									<div class="fix"></div>
								</div>
									<div class="fix"></div>
							</div> 
							
							{% endfor%}
						 
						</div>
                    
					</div>
                </div>	
				
				
{% endblock %}
